/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.cput.kleintjes.question3.dip.obeys.services.impl;

import ac.za.cput.kleintjes.question3.dip.obeys.model.BankAccount;
import ac.za.cput.kleintjes.question3.dip.obeys.services.ITransfer;

/**
 *
 * @author Administrator
 * Reference: www.blackwasp.co.uk/DIP.aspx
 */

public class Transfer implements ITransfer
{
    private BankAccount sourceAccount = new BankAccount();
    private BankAccount destinationAccount= new BankAccount();
    private double value;

    public BankAccount getDestinationAccount() {
        return destinationAccount;
    }

    public void setDestinationAccount(BankAccount destinationAccount) {
        this.destinationAccount = destinationAccount;
    }

    public BankAccount getSourceAccount() {
        return sourceAccount;
    }

    public void setSourceAccount(BankAccount sourceAccount) {
        this.sourceAccount = sourceAccount;
    }

    public double getValue() {
        return value;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public void Transfer()
    {
        sourceAccount.RemoveFunds(value);
        destinationAccount.AddFunds(value);
    }
}
